Build your own grid-connected inverter | Hacker Day

2021-12-08 09:15:14 By : Mr. Andy Luo

Inverters that convert direct current to alternating current are very common, and some cars even have standard alternating current sockets for you to plug in your favorite appliances. However, there is a special type of inverter called a grid-connected inverter, which can not only generate alternating current, but also inject it back through an alternating current socket, so as to supply power to other devices while serving the normal alternating current. Why? Maybe you want to use your own generator or solar energy. In some cases, if you generate more electricity than you consume, the power company will pay you. Maybe you just want to know you can do it. This seems to be the motivation behind the construction of [fotherby's], which is quite impressive.

This setting can only handle about 60 watts of power, but it can do all the functions you need: DC to AC conversion and phase and voltage matching. In fact, if you don't care about the waveform, converting DC to AC is almost trivial. But in this case, you really need to pay attention to whether you can create an AC signal to match the signal already on the line.

The project was simplified by using the STM32F407 board, which has some good high-speed A/D and TI H bridge boards. Another simplification is to use a transformer, so the inverter only needs to generate 40V. This is an extraordinary and somewhat dangerous project. However, [fotherby] provides a lot of details and theory, so even if you don't want to build it, you might like to look at the work.

Speaking of safety, the system will detect whether the mains voltage has deteriorated, and if so, the system will shut down the inverter. This helps prevent islanding-the utility or electrician thinks the circuit is not live, but the voltage comes from another source.

Overall, this is a very interesting project, especially if you don't usually deal with power cords. Obviously, if you want to do this in North America, you need to make some modifications. No matter where you are, if you try to do this, we recommend that you review some safety guidelines.

Glad you mentioned the island. Thank you for your post.

Yes, bad juju...Please don't kill the line workers. The life you save may be mine

Yes, I understand this, but if I need to work on the main line, I just shorten the line with a thick cable

Listen, this kind of "you will kill frontline workers" is nonsense. It's the same thing on a regular site like reddit, but it's unforgivable on a site like HaD, because you have to be very ignorant of basic electronics to think it's a danger.

First: if your community becomes an island, your inverter will try to power the entire community, which means it will actually short-circuit.

Second: Production line workers will not touch *nothing* unless they have tested it first.

Third: In addition to contacting *what* with insulated tools and gloves, production line workers, even if they have already tested it.

Every time this happens on reddit, the actual production line staff will chip in and say "yes, this is really not a problem." The power company cannot provide a case where a line worker was killed by a home power generation/inverter setting. However, in normal operations, *many* line workers almost always die because of lax safety precautions.

All the hustle and bustle surrounding grid-connected inverters and islands serves two purposes: to prevent home power generation by increasing costs, and to prevent homeowners from using the equipment they install to completely disconnect from the grid, because this is the power company's *really* fear. As more and more people no longer use the grid, the cost of the grid for each customer rises. This means that more people will not go out.

The only service provided by the utility company for people with several kilowatts of solar panels or wind turbines on the roof: night/low wind power generation and meeting the peak demand of high inrush current. Especially in the era of supercapacitors, cheap lithium-ion batteries, and extremely low resistance MOSFETs with better surge current handling capabilities... Utilities will soon become irrelevant.

Basically, the power company wants to restrict your home inverter, not for the safety of line workers, but because it poses a huge threat to their business model.

I don't think it is far from the "huge threat" you are talking about, although this may be the reason why most of this type is the most common installation (if it is).

If I invest in more energy storage, I have enough solar energy here that may be off the grid and make it work throughout the winter. However, this will greatly manage my lifestyle. If you don’t check if the power bank is enough/the sun is really coming out, you can’t turn on the next device. This is really inconvenient-I really have to worry about the refrigerator/fridge being closed for a few hours and no coffee tomorrow morning, because I washed a lot with the washing machine and dishwasher in the bad weather for the third consecutive winter today. thing.

In addition, in order to be able to get off the grid, you need to over-plan the lottery-so during peak periods, you will be able to produce more than you can store => even if you only get paid, the token amount of electricity you return helps To keep the natural gas and coal power stations closed (which is good for the planet) and you don’t need to spend extra to get this small expenditure.

I was surprised to see the line workers isolated from the network.

All the people I have seen who work on trams/railways (600V-1.5kV DC or 16.7-25kV AC) test the line voltage and then short it to ground before they start working. On the 400V AC power line, many rules mention turning off the power, testing whether everything is turned off normally, shorting all phases to the ground, and placing a lock with a note on the cabinet so that no one can switch to you Turn it on while you are working, and measure again when you will be working. I have never seen operators working on a line above 110 kV and it is powered on, but I heard that they charge themselves with a stick to keep their bodies at line voltage.

Just want to comment and thank you for your rational voice here. The Internet is full of ignorance, people yelling "Kill the lineman!" They grind out the materials to be processed. They take safety precautions. If they do not, it will not be your inverter that kills them, but the normal day during normal power operation. Normal safety precautions are the reason to ensure the safety and work of the linesman. It's nice to hear some logical considerations on this subject.

Isn't it easier to do it in simulation by using the power supply voltage itself as the reference waveform of the analog current mode PWM? It is basically a reverse active PFC.

If the purpose is purely for education, AC wall warts can be used to eliminate the need to connect to any power source-just plug it in.

If the purpose is to bypass the law about connecting homemade circuits to power sources, there may be some commercially available (and not too expensive) boxes that have been approved to be plugged into the power source and connected to the secondary of a large high-current transformer. Landscape lighting transformers used to be A light source, but as LEDs replace halogen lamps, larger transformers are less common, and newer transformers may be switchers. Welding machines (at least cheap for household use) are not designed for continuous work, and newer ones are often switchers.

The welding machine cannot work continuously at the maximum output, but it can be used at about 25%.

Probably why it is better to have 24V inverter/solar/battery settings then you can go for 2:1 2:1 or one of those rural 480:120 pole transformers.

I don't understand why the grid-connected inverter shuts down when the utility power is off. Of course, this is exactly when you most want to use solar/battery power. What should happen is that the power supply is disconnected to avoid islanding, but the inverter continues to supply power to the local wiring.

Even, why output power? The most obvious use of solar energy is to allow solar energy to supplement power, so you can use solar energy, but when the demand exceeds your settings, the power source will "replenish" it. Is there a "one-way" grid-connected inverter?

Because if they turn off the power for maintenance and you inject power into the line, people will die. See above: Isolated island.

Yes, I understand this, but why not just disconnect the inverter from the power supply instead of shutting it down completely?

There are some hybrid systems that can work like this, but require batteries as the anchor point of the system. Direct solar power generation is too unpredictable to produce a clean AC power signal.

Some newer inverters can use capacitors instead of batteries to do this.

There are different settings. Grid-connected inverters are not used for backup purposes. They are designed to offset the cost of electricity you use while maintaining the reliability of grid power and do not require batteries. In the case of grid connection, any excess electricity will be credited to your account, usually at the same rate you paid, in the summer you overproduce to build your credit, and then in the winter when you usually produce less, You will use up that credit. Home systems with backup batteries use completely different inverters and batteries, chargers, and automatic transfer switches to perform the operations you mentioned. The transfer switch system and the inverter also do not need to be synchronized.

Yes, the "hybrid" system is my idea. To me, this seems to be a completely obvious use case, but it seems to be rarely discussed, and the system always seems to be tied to the grid exported back to the utility, or a standalone/backup system completely separated from the utility.

Such a hybrid system would be much more expensive, and solar energy has been (still) difficult to sell.

Look at it from another angle: the places with the most reliable electricity are the same places with great potential for solar energy. At least in the United States, weather makes the power grid less reliable, and it also makes solar energy less viable.

Now *wind* electricity is a different story...

People don't realize the cost of the hybrid power system. The battery is about 30% of the cost, and it can only be used continuously, if you are lucky, 10 years, and then replace it for 10-20 years.

As an internal explanation, I make a living by installing solar energy.

Do you have any special suggestions on where to purchase solar installation packages? I am considering issues in the 5 kW range.

It depends, where do you live?

@Mike Grimes, as a professional in this field, I would like to know your opinion on lead-acid batteries and lithium-ion batteries-which is more reliable and which lasts longer? Which *long-term* have the lowest cost?

My Rolls-Surrette SA530 has been used for 14 years and 8 months

Canada-Southern Alberta, to be more specific.

Well, I'm in Lethbridge... Are you talking about off-grid or on-grid?

As for lead acid VS lithium. . I will use lithium iron phosphate batteries, lithium ion.

This is a link for comparison https://www.arkportablepower.com/blogs/news/54925381-deep-cycle-lifepo4-vs-lead-acid-pros-and-cons

Mike, is there still a problem with LFP battery charging below 0 C, or has it been solved?

The main reason not to put them in the car is that they cannot tolerate the cold. When you start the car, the battery will not charge, so you start to run out.

I think it will depend on whether a person's utility is so improved.

I am envious if you get the same export rate as you paid!

This kind of project is great as a teaching experiment, but I would never want to actually connect it to the mains voltage.

I built my own double-headed EVSE. This kind of project, like this, is dangerous if it is not done well. But just because it can do poorly does not mean that it is impossible not to do poorly.

But projects like this should not be improvised. You should know what safety systems exist in the reference design, what they are used for, and how to ensure that they work properly.

Since 2013, my Hydra has been charging us (although the design has been improving over the years).

It's fun to reinvent the wheel, but it has no practical value.

In fact, connecting it to the grid would be illegal autofocus, dangerous and extremely irresponsible.

The legality of homemade/home appliances is unlikely to be consistent globally, so be sure to understand the rules that apply to you! Things like this can be manufactured and installed completely safely with proper care, but I know that here, technically speaking, you are not allowed to do anything to the home circuit without approval. Although I very much doubt whether this has ever been done in my homework-some of the wiring I have worked in different friends' houses obviously never-in general it is completely safe, but the wires run in an illogical way and often the sockets are very difficult. Far from being able to turn off (at least legally) watering.

Hybrid grid-connected systems do exist. One or two models of Outback can be battery off-grid or grid-connected.

Regardless of the direction of energy flow, certain types of electricity meters will increase readings. This means that when the sun is full and the load is low, the remaining portion given to the utility company as a gift will be metered and billed. 60 W is no big deal. For larger settings, a function called a "limiter" is needed, which can be integrated into the inverter or a device like this is needed. I don't know if it will work well, I found it for the first time. https://www.aliexpress.com/item/4000097503320.html?spm=a2g0o.productlist.0.0.7a18b6616AtiIH&algo_pvid=4bb00295-64d0-4331-900b-c20f845df6eb&algo_expid=4bb00df6eb&algo_expid=4bb00fec905-64d0-4331-900b-c20f84515 searchweb0_0,searchweb201602_,searchweb201603_

correct. This is a potential result of an anti-tamper system. In the past, when the meter tank was inserted incorrectly, usually after the utility company cut it off for various reasons, the design would return the power to the service location. As a result, newer meters are tamper-proof, and they can still let power through, but regardless of the direction, the power is treated as delivered power. This is becoming more and more common on AMI/AMR systems, which install different tariff programs for grid-connected solar users in the meters. According to the requirements of our service area, it is a good way to find out who has not registered with the utility company for grid-connected solar energy. They called and complained about their system

Source: I am implementing AMI/AMR for our utilities

Modern class D amplifiers are very cheap on AliExpress. Use a fairly large transformer, or a small bunch of retrofitted old halogen transformers, and you will succeed.

There is no mention of Gorilla Solar. That was around 2000. I have studied it, but the cost savings are not worth it.

It is not the correct definition of an island, that is, when you are off the grid and have a separate grid, just like in an island off the mainland.

I often consider charging the batteries during off-peak hours and dumping them back to the grid during peak hours (charging 20 cents at night and discharging 54 cents during the day), but honestly I don’t think I will get enough efficiency.

Please be kind and respectful to help make the comment section great. (Comment Policy)

This website uses Akismet to reduce spam. Learn how to handle your comment data.

By using our website and services, you explicitly agree to the placement of our performance, functionality and advertising cookies. learn more